﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace HotelDal.Migrations
{
    public partial class init : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "Amusement",
                columns: table => new
                {
                    Aid = table.Column<int>(nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Aname = table.Column<string>(nullable: true),
                    Aprice = table.Column<decimal>(nullable: false),
                    Acomment = table.Column<string>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Amusement", x => x.Aid);
                });

            migrationBuilder.CreateTable(
                name: "Departments",
                columns: table => new
                {
                    Did = table.Column<int>(nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Department = table.Column<string>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Departments", x => x.Did);
                });

            migrationBuilder.CreateTable(
                name: "Positions",
                columns: table => new
                {
                    Pid = table.Column<int>(nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Position = table.Column<string>(nullable: true),
                    Department = table.Column<int>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Positions", x => x.Pid);
                });

            migrationBuilder.CreateTable(
                name: "Recreation",
                columns: table => new
                {
                    Rid = table.Column<int>(nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Rname = table.Column<int>(nullable: false),
                    RkaiTime = table.Column<DateTime>(nullable: false),
                    RjieTime = table.Column<DateTime>(nullable: false),
                    Rprincipal = table.Column<string>(nullable: true),
                    Rstate = table.Column<int>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Recreation", x => x.Rid);
                });

            migrationBuilder.CreateTable(
                name: "Staffs",
                columns: table => new
                {
                    STaffID = table.Column<int>(nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    SSerial = table.Column<string>(nullable: true),
                    SName = table.Column<string>(nullable: true),
                    SSex = table.Column<string>(nullable: true),
                    SAge = table.Column<int>(nullable: false),
                    SPosition = table.Column<int>(nullable: false),
                    SRemark = table.Column<string>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Staffs", x => x.STaffID);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "Amusement");

            migrationBuilder.DropTable(
                name: "Departments");

            migrationBuilder.DropTable(
                name: "Positions");

            migrationBuilder.DropTable(
                name: "Recreation");

            migrationBuilder.DropTable(
                name: "Staffs");
        }
    }
}
